package de.hft_stuttgart.dsa.ctt.model;

/**
 * @author Eduard Tudenhoefner
 */
public class UnavailabilityConstraint {
	private String courseId;
	private int dayOfWeek;
	private int periodOfDay;
	private Period period;

	public UnavailabilityConstraint() {
		super();
	}

	public UnavailabilityConstraint(String courseId, int day, int periodOfDay) {
		super();
		this.courseId = courseId;
		this.dayOfWeek = day;
		this.periodOfDay = periodOfDay;
		// TODO: where to get periodsPerDay from?
		// period = new Period(periodsPerDay, periodOfDay, day)
	}

	public UnavailabilityConstraint(String unavailabilityConstraintLine) {
		String[] unavailabilityConstraintSpecification = unavailabilityConstraintLine.split(" ");
		this.courseId = unavailabilityConstraintSpecification[0];
		this.dayOfWeek = Integer.parseInt(unavailabilityConstraintSpecification[1]);
		this.periodOfDay = Integer.parseInt(unavailabilityConstraintSpecification[2]);
	}

	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}

	public int getDayOfWeek() {
		return dayOfWeek;
	}

	public void setDayOfWeek(int dayOfWeek) {
		this.dayOfWeek = dayOfWeek;
	}

	public int getPeriodOfDay() {
		return periodOfDay;
	}

	public void setPeriodOFDay(int periodOfDay) {
		this.periodOfDay = periodOfDay;
	}

}
